<div id="app">
  <user class="username" :data-user="username"></user>
</div>
<script src="https://unpkg.com/vue@next"></script>
<script>
  const User = {
    template: `<div>{{$attrs['data-user']}}</div>`,
    created() {
      console.log(this.$attrs['data-user'])
    }
  }

  Vue.createApp({
    components: { User },
    data() {
      return { username: 'hunger' }
    }
  }).mount('#app')
</script>